import baseRoutes from "../routes/base";
export default [
  {
    path: "/",
    name: "Root",
    redirect: "/base",
    meta: {
      title: "",
      isKeepAlive: false,
    },
  },

  {
    path: "/login",
    name: "Login",
    component: () =>
      import(/* webpackChunkName: "Login" */ "@/layouts/login/login.vue"),
    meta: {
      title: "登录",
    },
  },

  {
    path: "/logout",
    name: "Logout",
    component: () =>
      import(/* webpackChunkName: "Logout" */ "@/layouts/logout/logout.vue"),
    meta: {
      title: "退出",
    },
  },

  {
    path: "/noPermission",
    name: "NoPermission",
    component: () =>
      import(
        /* webpackChunkName: "NoPermission" */ "@/layouts/noPermission/noPermission.vue"
      ),
    meta: {
      title: "退出",
    },
  },

  {
    path: "/base",
    name: "Base",
    component: () =>
      import(/* webpackChunkName: "Base" */ "@/layouts/base/base.vue"),
    redirect: "/dashboard",
    children: [...baseRoutes],
    meta: {
      title: "基础",
    },
  },

  {
    // vue2 匹配剩余路径用 "*", vue3 用 "/:pathMatch(.*)",
    path: "/:pathMatch(.*)",
    name: "404",
    component: () =>
      import(/* webpackChunkName: "404" */ "@/layouts/404/404.vue"),
    meta: {
      title: "暂无该页面",
    },
  },
];
